﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 访问日志
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("访问日志")]
	[BindTable("VisitLog", Description = "访问日志", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class VisitLog
	{
		#region 属性
		private String _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, false, false, 50)]
		[BindColumn(1, "ID", "编号", "", "nvarchar(50)", 0, 0, true)]
		public String ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _SiteID;
		/// <summary>
		/// 站点编号
		/// </summary>
		[Description("站点编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(2, "SiteID", "站点编号", "", "int", 10, 0, false)]
		public Int32 SiteID
		{
			get { return _SiteID; }
			set { if (OnPropertyChange("SiteID", value)) _SiteID = value; }
		}

		private String _URL;
		/// <summary>
		/// 网址
		/// </summary>
		[Description("网址")]
		[DataObjectField(false, false, false, 500)]
		[BindColumn(3, "URL", "网址", "", "nvarchar(500)", 0, 0, true)]
		public String URL
		{
			get { return _URL; }
			set { if (OnPropertyChange("URL", value)) _URL = value; }
		}

		private String _IP;
		/// <summary>
		/// 地址
		/// </summary>
		[Description("地址")]
		[DataObjectField(false, false, true, 30)]
		[BindColumn(4, "IP", "地址", "", "nvarchar(30)", 0, 0, true)]
		public String IP
		{
			get { return _IP; }
			set { if (OnPropertyChange("IP", value)) _IP = value; }
		}

		private String _OS;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(5, "OS", "", "", "nvarchar(50)", 0, 0, true)]
		public String OS
		{
			get { return _OS; }
			set { if (OnPropertyChange("OS", value)) _OS = value; }
		}

		private String _Browser;
		/// <summary>
		/// 浏览器
		/// </summary>
		[Description("浏览器")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(6, "Browser", "浏览器", "", "nvarchar(50)", 0, 0, true)]
		public String Browser
		{
			get { return _Browser; }
			set { if (OnPropertyChange("Browser", value)) _Browser = value; }
		}

		private String _Screen;
		/// <summary>
		/// 绿色
		/// </summary>
		[Description("绿色")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(7, "Screen", "绿色", "", "nvarchar(10)", 0, 0, true)]
		public String Screen
		{
			get { return _Screen; }
			set { if (OnPropertyChange("Screen", value)) _Screen = value; }
		}

		private String _Referer;
		/// <summary>
		/// 引用
		/// </summary>
		[Description("引用")]
		[DataObjectField(false, false, true, 500)]
		[BindColumn(8, "Referer", "引用", "", "nvarchar(500)", 0, 0, true)]
		public String Referer
		{
			get { return _Referer; }
			set { if (OnPropertyChange("Referer", value)) _Referer = value; }
		}

		private String _ColorDepth;
		/// <summary>
		/// 颜色深度
		/// </summary>
		[Description("颜色深度")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(9, "ColorDepth", "颜色深度", "", "nvarchar(10)", 0, 0, true)]
		public String ColorDepth
		{
			get { return _ColorDepth; }
			set { if (OnPropertyChange("ColorDepth", value)) _ColorDepth = value; }
		}

		private String _CookieEnabled;
		/// <summary>
		/// Cookie启用
		/// </summary>
		[Description("Cookie启用")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(10, "CookieEnabled", "Cookie启用", "", "nvarchar(10)", 0, 0, true)]
		public String CookieEnabled
		{
			get { return _CookieEnabled; }
			set { if (OnPropertyChange("CookieEnabled", value)) _CookieEnabled = value; }
		}

		private String _FlashEnabled;
		/// <summary>
		/// Flash启用
		/// </summary>
		[Description("Flash启用")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(11, "FlashEnabled", "Flash启用", "", "nvarchar(10)", 0, 0, true)]
		public String FlashEnabled
		{
			get { return _FlashEnabled; }
			set { if (OnPropertyChange("FlashEnabled", value)) _FlashEnabled = value; }
		}

		private String _FlashVersion;
		/// <summary>
		/// Flash版本
		/// </summary>
		[Description("Flash版本")]
		[DataObjectField(false, false, true, 30)]
		[BindColumn(12, "FlashVersion", "Flash版本", "", "nvarchar(30)", 0, 0, true)]
		public String FlashVersion
		{
			get { return _FlashVersion; }
			set { if (OnPropertyChange("FlashVersion", value)) _FlashVersion = value; }
		}

		private String _JavaEnabled;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(13, "JavaEnabled", "", "", "nvarchar(10)", 0, 0, true)]
		public String JavaEnabled
		{
			get { return _JavaEnabled; }
			set { if (OnPropertyChange("JavaEnabled", value)) _JavaEnabled = value; }
		}

		private String _Language;
		/// <summary>
		/// 语言
		/// </summary>
		[Description("语言")]
		[DataObjectField(false, false, true, 30)]
		[BindColumn(14, "Language", "语言", "", "nvarchar(30)", 0, 0, true)]
		public String Language
		{
			get { return _Language; }
			set { if (OnPropertyChange("Language", value)) _Language = value; }
		}

		private String _District;
		/// <summary>
		/// 区域
		/// </summary>
		[Description("区域")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(15, "District", "区域", "", "nvarchar(50)", 0, 0, true)]
		public String District
		{
			get { return _District; }
			set { if (OnPropertyChange("District", value)) _District = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(16, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(17, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(18, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(19, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(20, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "SiteID" : return _SiteID;
					case "URL" : return _URL;
					case "IP" : return _IP;
					case "OS" : return _OS;
					case "Browser" : return _Browser;
					case "Screen" : return _Screen;
					case "Referer" : return _Referer;
					case "ColorDepth" : return _ColorDepth;
					case "CookieEnabled" : return _CookieEnabled;
					case "FlashEnabled" : return _FlashEnabled;
					case "FlashVersion" : return _FlashVersion;
					case "JavaEnabled" : return _JavaEnabled;
					case "Language" : return _Language;
					case "District" : return _District;
					case "AddTime" : return _AddTime;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToString(value); break;
					case "SiteID" : _SiteID = Convert.ToInt32(value); break;
					case "URL" : _URL = Convert.ToString(value); break;
					case "IP" : _IP = Convert.ToString(value); break;
					case "OS" : _OS = Convert.ToString(value); break;
					case "Browser" : _Browser = Convert.ToString(value); break;
					case "Screen" : _Screen = Convert.ToString(value); break;
					case "Referer" : _Referer = Convert.ToString(value); break;
					case "ColorDepth" : _ColorDepth = Convert.ToString(value); break;
					case "CookieEnabled" : _CookieEnabled = Convert.ToString(value); break;
					case "FlashEnabled" : _FlashEnabled = Convert.ToString(value); break;
					case "FlashVersion" : _FlashVersion = Convert.ToString(value); break;
					case "JavaEnabled" : _JavaEnabled = Convert.ToString(value); break;
					case "Language" : _Language = Convert.ToString(value); break;
					case "District" : _District = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得访问日志字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 站点编号
			///</summary>
			public const String SiteID = "SiteID";

			///<summary>
			/// 网址
			///</summary>
			public const String URL = "URL";

			///<summary>
			/// 地址
			///</summary>
			public const String IP = "IP";

			///<summary>
			/// 
			///</summary>
			public const String OS = "OS";

			///<summary>
			/// 浏览器
			///</summary>
			public const String Browser = "Browser";

			///<summary>
			/// 绿色
			///</summary>
			public const String Screen = "Screen";

			///<summary>
			/// 引用
			///</summary>
			public const String Referer = "Referer";

			///<summary>
			/// 颜色深度
			///</summary>
			public const String ColorDepth = "ColorDepth";

			///<summary>
			/// Cookie启用
			///</summary>
			public const String CookieEnabled = "CookieEnabled";

			///<summary>
			/// Flash启用
			///</summary>
			public const String FlashEnabled = "FlashEnabled";

			///<summary>
			/// Flash版本
			///</summary>
			public const String FlashVersion = "FlashVersion";

			///<summary>
			/// 
			///</summary>
			public const String JavaEnabled = "JavaEnabled";

			///<summary>
			/// 语言
			///</summary>
			public const String Language = "Language";

			///<summary>
			/// 区域
			///</summary>
			public const String District = "District";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}